﻿Imports System
Imports System.Collections

Public Class PermisoBE
#Region "Campos y Propiedades"
    Private _IdPermiso As Integer
    Private _Nombre As String
    Private _FechaCreacion As DateTime
    Private _FechaModificacion As DateTime
    Private _Estado As String

    Public Property IdPermiso() As Integer
        Get
            Return _IdPermiso
        End Get
        Set(ByVal value As Integer)
            _IdPermiso = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property FechaCreacion() As DateTime
        Get
            Return _FechaCreacion
        End Get
        Set(ByVal value As DateTime)
            _FechaCreacion = value
        End Set
    End Property

    Public Property FechaModificacion() As DateTime
        Get
            Return _FechaModificacion
        End Get
        Set(ByVal value As DateTime)
            _FechaModificacion = value
        End Set
    End Property

    Public Property Estado() As String
        Get
            Return _Estado
        End Get
        Set(ByVal value As String)
            _Estado = value
        End Set
    End Property


#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdPermiso As Integer, ByVal Nombre As String, ByVal FechaCreacion As DateTime, ByVal FechaModificacion As DateTime, ByVal Estado As String)
        Me._IdPermiso = IdPermiso
        Me._Nombre = Nombre
        Me._FechaCreacion = FechaCreacion
        Me._FechaModificacion = FechaModificacion
        Me._Estado = Estado
    End Sub
#End Region
End Class

Public Class PermisoBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As PermisoBE
        Get
            Return CType(List(index), PermisoBE)
        End Get
        Set(ByVal value As PermisoBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As PermisoBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As PermisoBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As PermisoBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As PermisoBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As PermisoBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class


